#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    int min, max;
    int sum = 0;
    cin >> min >> max;
    for (int i = min; i <= max; i++)
    {
        sum += pow(i, 2);
    }
    cout << sum;
    return 0;
}